<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width">
    <meta name="format-detection" content="telephone=yes"/>
    <title>问题反馈</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/base.css">
    <style>
        textarea{resize:none;outline: none;}
        .text1{position: relative;background-color: #ffffff;margin:20px auto;width: 93%;border-radius: 6px;border: 1px solid #d4d4d4;}
        .spp{position: absolute; left: 88%;top:92%;font-size: 0.8em;color: #E2E2E2;}
        .sub{width: 80%;height: 50px;border-radius: 5px; margin: 40% auto 0;color: #ffffff;background-color: #F5CE2F;}
        .text1 textarea{border: none; display: block;font-size:1em; border-radius: 6px;width: 92%;height: 100%;margin:11px auto;}
    </style>
</head>
<body>
<div class="wrapper">
 <div class="text1">
    <textarea rows="16" id="text1" cols="25" onkeyup="checkLen(this)" maxlength="500" placeholder="您有任何问题与建议都可以反馈给我们"></textarea>
     <div class="spp"><span id="count">0</span>/500</div>
 </div>
    <button class="sub fz11 dis_b">提交</button>
    <div class="prompt_box hide1" id="error" >
        <span class="prompt_span" id="errmsg"></span>
    </div>
</div>
<script src="../../js/jquery-2.1.4.min.js"></script>
<script src="../../js/personal.js"></script>
<script>
    function checkLen(obj)
    {
        var maxChars = 500;//最多字符数
        if (obj.value.length > maxChars)
            obj.value = obj.value.substring(0,maxChars);
        var curr = 0 + obj.value.length;
        document.getElementById("count").innerHTML = curr.toString();
    }
    $('.sub').click(function(){
        var txt=$('#text1').val();
        if(txt==''){
            $("#errmsg").html('内容不能为空');
            $("#error").show();
            errorHide();
            return
        }
    });
</script>
</body>
</html>